import 'package:flutter/material.dart';

enum ControlMode {
  manual,
  gravity,
  path,
  voice,
  programming,
}

extension ControlModeExtension on ControlMode {
  String get name {
    switch (this) {
      case ControlMode.manual:
        return '手动模式';
      case ControlMode.gravity:
        return '重力感应模式';
      case ControlMode.path:
        return '路径模式';
      case ControlMode.voice:
        return '语音控制模式';
      case ControlMode.programming:
        return '编程模式';
    }
  }

  String get description {
    switch (this) {
      case ControlMode.manual:
        return '模拟操纵杆，分为油门及方向控制';
      case ControlMode.gravity:
        return '通过翻转手机控制飞机方向';
      case ControlMode.path:
        return '在屏幕上画出路径，控制模型按照路径飞行';
      case ControlMode.voice:
        return '通过语音控制，如"启动"、"左转"、"降落"等';
      case ControlMode.programming:
        return '使用积木式编程块创建飞行程序，类似Scratch';
    }
  }

  IconData get icon {
    switch (this) {
      case ControlMode.manual:
        return Icons.gamepad;
      case ControlMode.gravity:
        return Icons.screen_rotation;
      case ControlMode.path:
        return Icons.timeline;
      case ControlMode.voice:
        return Icons.mic;
      case ControlMode.programming:
        return Icons.code;
    }
  }
} 